					
                    <?php
						$id_root_sp = "-1";
						if ($a==$list['13']['alias'] || $a==$list['12']['alias'] || $a==$list['14']['alias'] || $a==$list['15']['alias']) {
							if ($a==$list['13']['alias'])
								$id_root_sp = $cc;
							if ($a==$list['12']['alias']) {
								$sanpham_chungloai = $t->get_by_thutu("sanpham_chungloai",$dd,1);
								$row_cl=mysql_fetch_assoc($sanpham_chungloai);
								
								$id_root_sp = $row_cl['idroot'];
							}
							if ($a==$list['14']['alias']) {
								$sanpham_loai = $t->get_by_thutu("sanpham_loai",$ee,1);
								$row_l=mysql_fetch_assoc($sanpham_loai);
								
								$id_root_sp = $row_l['idroot'];
							}
							if ($a==$list['15']['alias']) {
								$sanpham=$t->get_by_thutu("sanpham",$ff);
								$row_sp=mysql_fetch_assoc($sanpham);
								
								$id_root_sp = $row_sp['idroot'];
							}
						}
					?>
                    <div class="menu_left">
                    	<?
							$sanpham_root = $t->get_by_thutu("sanpham_root",-1,1," AND idmenu=2 and 1 = 
															  (select anhien from sanpham_menu where id = 2) ");
							while($row_root=mysql_fetch_assoc($sanpham_root)){
								$idmenu=$row_root['idmenu'];
								$menu=$t->get_by_thutu("sanpham_menu",$idmenu);
								$row_menu=mysql_fetch_assoc($menu);
								if($row_menu['ten_'.$lang]=='') $row_menu['ten_'.$lang]='-';
						?>
						<label class="<?php if ($row_root['id']==$id_root_sp) echo "chose"; ?>"> <a href="<?=$rooturl?><?=$list['13']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>-<?=$row_root['id']?>.html"><?=$row_root['ten_'.$lang]?></a>
							<?php 
							$sanpham_chungloai = $t->get_by_thutu("sanpham_chungloai",-1,1," AND idroot=".$row_root['id']);
							if (mysql_num_rows($sanpham_chungloai) != 0): ?>
							<ul <?php if ($row_root['id']==$id_root_sp) echo "style='display:block;'"; ?>>
                            	<?
									$flag=0;
									while($row_cl=mysql_fetch_assoc($sanpham_chungloai)){
								?>
								<li <? if ($flag==0) { echo "class='top'"; $flag=1; } ?>>
									<a href="<?=$rooturl?><?=$list['12']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>/<?=convert($row_cl['ten_'.$lang])?>-<?=$row_cl['id']?>.html"><?=$row_cl['ten_'.$lang]?></a>
									<?php 
									$sanpham_loai = $t->get_by_thutu("sanpham_loai",-1,1," AND idcl=".$row_cl['id']);
									if (mysql_num_rows($sanpham_loai) != 0): ?>
									<ul>
                                    	<?
											$flag2=0;
											while($row_l=mysql_fetch_assoc($sanpham_loai)){
										?>
										<li <? if ($flag2==0) { echo "class='top'"; $flag2=1; } ?>>
											<a href="<?=$rooturl?><?=$list['14']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>/<?=convert($row_cl['ten_'.$lang])?>/<?=convert($row_l['ten_'.$lang])?>-<?=$row_l['id']?>.html"><?=$row_l['ten_'.$lang]?></a>
										</li>
                                        <?
											}
										?>
									</ul>
									<?php endif ?>
								</li>
                                <?
									}
								?>
							</ul> 
							<?php endif ?>
                        </label>
                        <?
							}
						?>
					</div>
                    
                    
                    
                    
                    
                    	<?
							$sanpham_root = $t->get_by_thutu("sanpham_root",-1,1," AND idmenu=1 and 1 = 
															  (select anhien from sanpham_menu where id = 1) ");
							while($row_root=mysql_fetch_assoc($sanpham_root)){
								$idmenu=$row_root['idmenu'];
								$menu=$t->get_by_thutu("sanpham_menu",$idmenu);
								$row_menu=mysql_fetch_assoc($menu);
								if($row_menu['ten_'.$lang]=='') $row_menu['ten_'.$lang]='-';
						?>
                        <div class="menu_right" style="margin-bottom:6px;">
							<label><a href="<?=$rooturl?><?=$list['13']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>-<?=$row_root['id']?>.html"><?=$row_root['ten_'.$lang]?></a></label>
							<?php 
							$sanpham_chungloai = $t->get_by_thutu("sanpham_chungloai",-1,1," AND idroot=".$row_root['id']);
							if (mysql_num_rows($sanpham_chungloai) != 0): ?>
							<ul>
                            	<?
									$flag=0;
									while($row_cl=mysql_fetch_assoc($sanpham_chungloai)){
								?>
								<li <? if ($flag==0) { echo "class='top'"; $flag=1; } ?>>
									<a href="<?=$rooturl?><?=$list['12']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>/<?=convert($row_cl['ten_'.$lang])?>-<?=$row_cl['id']?>.html"><?=$row_cl['ten_'.$lang]?></a>
									<?php 
									$sanpham_loai = $t->get_by_thutu("sanpham_loai",-1,1," AND idcl=".$row_cl['id']);
									if (mysql_num_rows($sanpham_loai) != 0): ?>
									<ul>
                                    	<?
											$flag2=0;
											while($row_l=mysql_fetch_assoc($sanpham_loai)){
										?>
										<li <? if ($flag2==0) { echo "class='top'"; $flag2=1; } ?>>
											<a href="<?=$rooturl?><?=$list['14']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>/<?=convert($row_cl['ten_'.$lang])?>/<?=convert($row_l['ten_'.$lang])?>-<?=$row_l['id']?>.html"><?=$row_l['ten_'.$lang]?></a>
										</li>
										<?
											}
										?>
									</ul>
									<?php endif ?>
								</li>
                                <?
									}
								?>
							</ul>
							<?php endif ?>
						</div>
						<?
							}
						?>